package cn.edu.scau.cmi.zhuangxipan.singleton;

public class Chairman {
	private static Chairman chairman;
	private String name;
	
	private Chairman(String name) {
		this.name= name;
	}
	
	public  void setName(String name) {
		this.name= name;
	}
	
	public String getName() {
		return name;
	}
	
	public static Chairman getInstance(String name) {
		if(chairman==null&&!name.equals(null)) {
			chairman= new Chairman(name);
			return chairman;
		}
		else return chairman;
	}

}
